import { PanelDataProvider } from '../panel-data-provider/panel-data-provider';

/**
 * 面板项适配基类
 *
 * @author chitanda
 * @date 2022-02-17 14:02:53
 * @export
 * @interface PanelContentProvider
 */
export interface PanelContentProvider {
  /**
   * 适配类型
   *
   * @author chitanda
   * @date 2022-02-18 15:02:45
   * @type {string}
   */
  type: string;
  /**
   * 所属素材区分组
   *
   * @author chitanda
   * @date 2022-02-16 20:02:12
   * @type {string}
   */
  materialGroup: string;
  /**
   * 素材组件名称
   *
   * @author chitanda
   * @date 2022-02-17 15:02:27
   * @type {string}
   */
  materialComponent: string;
  /**
   * 内容组件名称
   *
   * @author chitanda
   * @date 2022-02-17 15:02:52
   * @type {string}
   */
  contentComponent: string;
  /**
   * 新建项数据
   *
   * @author chitanda
   * @date 2022-02-18 15:02:33
   * @param {(PanelDataProvider | null)} parent
   * @return {*}  {Promise<PanelDataProvider>}
   */
  createItem(parent: PanelDataProvider | null): Promise<PanelDataProvider>;
  /**
   * 删除项
   *
   * @author chitanda
   * @date 2022-02-18 16:02:51
   * @param {PanelDataProvider} item
   * @return {*}  {Promise<boolean>}
   */
  removeItem(item: PanelDataProvider): Promise<boolean>;
  /**
   * 移动项
   *
   * @author chitanda
   * @date 2022-02-18 16:02:29
   * @param {PanelDataProvider} from
   * @param {PanelDataProvider} to
   * @param {PanelDataProvider} item
   * @return {*}  {Promise<boolean>}
   */
  moveItem(from: PanelDataProvider, to: PanelDataProvider, item: PanelDataProvider): Promise<boolean>;
}
